Downhole surveying utilizing multiple measurements

ABSTRACT

Certain embodiments described herein provide a measure of the misalignment of multiple acceleration sensors mounted in the downhole portion of a drill string. In certain embodiments, the measure of the misalignment corresponds to a measure of sag which can be used to provide an improved estimate of the inclination of the downhole portion of the drill string and/or the wellbore. Certain embodiments described herein provide an estimate of the magnetic interference incident upon a drilling system using multiple magnetic sensors mounted within a non-magnetic region of the downhole portion of the drilling system. Certain embodiments utilize the magnetic measurements to determine an axial interference resulting from one or more magnetic portions of the downhole portion and to provide an improved estimate of the azimuthal orientation of the downhole portion with respect to the magnetic field of the Earth.

BACKGROUND

1. Field of the Invention

The present application relates generally to systems and methods forutilizing measurements from multiple sensors on a drilling tool within awellbore to correct for measurement errors and/or determine the positionof the wellbore in relation to another wellbore.

2. Description of the Related Art

Rotary steerable drilling tools can be equipped with surveyinstrumentation, such as measurement while drilling (MWD)instrumentation, which provides information regarding the orientation ofthe survey tool, and hence, the orientation of the well at the toollocation. Survey instrumentation can make use of various measuredquantities such as one or more of acceleration, magnetic field, andangular rate to determine the orientation of the tool and the associatedwellbore with respect to a reference vector such as the Earth'sgravitational field, magnetic field, or rotation vector. Thedetermination of such directional information at generally regularintervals along the path of the well can be combined with measurementsof well depth to allow the trajectory of the well to be determined.However, measurements used in this process can be subject to errors. Forexample, the errors may be the result of imperfections internal to theinstrumentation itself or external disturbances that can affect theoutput of the instrumentation and its associated sensors. Internalerrors can generally be accounted for using calibration techniques andother methods. However, external errors, such as errors resulting frommisalignments of the sensors within the wellbore, or errors caused bydisturbances affecting the relevant reference vector (e.g., the Earth'smagnetic field) can be more difficult to correct.

In addition, when a wellbore is drilled in an area in which one or moreexisting wellbores are present it is useful to determine the relativeposition of the wellbore and downhole portion of the drilling tool inrelation to the existing wellbore. For example, this information can beuseful to avoid collisions with existing wellbores or to drill a reliefwell to intercept an existing well. Furthermore, there are situations inwhich it is useful to drill a well alongside an existing well toimplement a process known as steam assisted gravity drainage (SAGD) tofacilitate the retrieval of heavy oil deposits in certain parts of theworld. In this case, existing methods involve inserting equipment, suchas a solenoid, into the existing wellbores. The equipment gives rise tomagnetic field disturbances, which can be detected by sensors in the newwell and used to determine the position of the drilling tool andwellbore in relation to the existing wellbore. Such techniques can becostly, in part because of the additional equipment involved and becausesuch operations are time consuming.

SUMMARY

In certain embodiments, a drill string is provided which includes adownhole portion adapted to move within a wellbore, the downhole portionhaving a first portion at a first position within the wellbore andoriented at a first angle relative to the wellbore at the first positionand a second portion at a second position within the wellbore andoriented at a second angle relative to the wellbore at the secondposition, wherein at least one of the first and second angles isnon-zero. The drill string of certain embodiments includes a firstacceleration sensor mounted within the first portion, the firstacceleration sensor adapted to generate a first signal indicative of anacceleration of the first acceleration sensor. The drill string ofcertain embodiments also includes a second acceleration sensor mountedwithin the second portion, the second acceleration sensor adapted togenerate a second signal indicative of an acceleration of the secondacceleration sensor.

In certain embodiments, a method for generating information indicativeof misalignment between first and second acceleration sensors mountedwithin the downhole portion of a drill string is provided. The method ofcertain embodiments includes providing a drill string comprising. Thedrill string of certain embodiments includes a downhole portion adaptedto move within a wellbore, the downhole portion having a first portionat a first position within the wellbore and oriented at a first anglerelative to the wellbore at the first position and a second portion at asecond position within the wellbore and oriented at a second anglerelative to the wellbore at the second position wherein at least one ofthe first and second angles is non-zero. The drill string can alsoinclude a first acceleration sensor mounted within the first portion,the first acceleration sensor adapted to generate a first signalindicative of an acceleration of the first acceleration sensor and asecond acceleration sensor mounted within the second portion, the secondacceleration sensor adapted to generate a second signal indicative of anacceleration of the second acceleration sensor. The method of certainembodiments further includes generating the first signal and the secondsignal while the downhole portion of the drill string is within thewellbore.

In certain embodiments, a method of determining the misalignment betweenfirst and second acceleration sensors mounted within a drill string isprovided. The method of certain embodiments includes receiving one ormore acceleration measurements from a first acceleration sensor in afirst portion of the drill string at a first position within a wellbore,the first portion oriented at a first angle relative the wellbore at thefirst position. The method further includes receiving one or moreacceleration measurements from a second acceleration sensor in a secondportion of the drill string at a second position within the wellbore,the second portion oriented at a second angle relative to the wellboreat the second position, wherein at least one of the first and secondangles is non-zero. The method further includes calculating thedifference between the first angle and the second angle in response tothe one or more acceleration measurements from the first accelerationsensor and the one or more measurements from the second accelerationsensor.

In certain embodiments, a drilling system is provided which includes adownhole portion adapted to move along a first wellbore, the downholeportion comprising one or more magnetic regions and one or morenon-magnetic regions. The drilling system of certain embodimentsincludes at least two magnetic sensors within at least one non-magneticregion of the downhole portion, the at least two magnetic sensorscomprising a first magnetic sensor and a second magnetic sensor spacedapart from one another by a non-zero distance, the first magnetic sensoradapted to generate a first signal in response to magnetic fields of theEarth and of the one or more magnetic regions, the second magneticsensor adapted to generate a second signal in response to magneticfields of the Earth and of the one or more magnetic regions. Thedrilling system can include a controller configured to receive the firstsignal and the second signal and to calculate the magnetic field of theone or more magnetic regions.

In certain embodiments, a method for generating information indicativeof the magnetic field in a first wellbore is provided. The methodincludes providing a drilling system comprising a downhole portionadapted to move along a first wellbore, the downhole portion comprisingone or more magnetic regions and one or more non-magnetic regions. Thedrilling system of certain embodiments further includes at least twomagnetic sensors within at least one non-magnetic region of the downholeportion, the at least two magnetic sensors comprising a first magneticsensor and a second magnetic sensor spaced apart from one another by anon-zero distance, the first magnetic sensor adapted to generate a firstsignal in response to magnetic fields of the Earth and of the one ormore magnetic regions, the second magnetic sensor adapted to generate asecond signal in response to magnetic fields of the Earth and of the oneor more magnetic regions. The method further includes generating thefirst signal and the second signal while the downhole portion of thedrilling system is at a first location within the first wellbore andcalculating the magnetic field in the first wellbore in response to thefirst and second signals.

In certain embodiments, a method for determining the magnetic field in awellbore is provided. The method includes receiving one or more magneticmeasurements from at least two magnetic sensors within at least onenon-magnetic region of a downhole portion of a drilling system, the atleast two magnetic sensors comprising a first magnetic sensor and asecond magnetic sensor spaced apart from one another by a non-zerodistance, the first magnetic sensor generating a first signal inresponse to magnetic fields of the Earth and of one or more magneticregions of the downhole portion, the second magnetic sensor generating asecond signal in response to magnetic fields of the Earth and of the oneor more magnetic regions. The method of certain embodiments furtherincludes calculating the magnetic field in response to the one or moremagnetic measurements from the at least two magnetic sensors.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically illustrates an example drill string for use in awellbore and having first and second acceleration sensors that aremisaligned in accordance with certain embodiments described herein.

FIG. 2 schematically illustrates an example drill string for use in awellbore and having first and second acceleration sensors that aremisaligned and where the drill string is in a portion of the wellborehaving a curvature in accordance with certain embodiments describedherein.

FIG. 3 is a flowchart of an example method of generating informationindicative of misalignment between first and second acceleration sensorsmounted in the downhole portion of a drill string in accordance withcertain embodiments described herein.

FIG. 4 is a flowchart of an example method of determining themisalignment between first and second acceleration sensors mounted onthe downhole portion of a drill string in accordance with certainembodiments described herein.

FIG. 5 schematically illustrates an example drilling system including adownhole portion moving along a first wellbore and including at leasttwo magnetic sensors in accordance with certain embodiments describedherein.

FIG. 6 schematically illustrates the example drilling system of FIG. 5wherein the downhole portion is moving along a first wellbore and ispositioned relative to a second wellbore spaced from the first wellborein accordance with certain embodiments described herein.

FIG. 7 is a flowchart of an example method of generating informationindicative of the magnetic field in a wellbore in accordance withcertain embodiments described herein.

FIG. 8 is a flowchart of an example method of determining the magneticfield in a wellbore in accordance with certain embodiments describedherein.

DETAILED DESCRIPTION

Certain embodiments described herein provide a downhole-based system forutilizing measurements from multiple sensors on a drilling tool within awellbore to correct for measurement errors and so allow the trajectoryof the well to be determined with greater accuracy than could beachieved using a single set of sensors. The application of multiplesensors also facilitates the determination of the position of thewellbore in relation to another wellbore. In certain embodiments, thesystem is generally used in logging and drilling applications.

In certain embodiments described herein, measurements from multiplesensors on a drill string provide improved measurement accuracy. Forexample, certain embodiments described herein correct for externalsensor errors utilizing multiple sensors. Sensors may be included in,for example, a measurement while drilling (MWD) instrumentation pack.Additional sensors may be located on a rotary steerable tool inaccordance with certain embodiments described herein, and can provideenhanced accuracy of, for example, the measurement of the direction inwhich the well is progressing and can provide more immediate informationregarding changes in well direction. Certain embodiments describedherein disclose a drill string including a MWD survey instrument and arotary steerable tool, where both the MWD survey instrument and therotary steerable tool include acceleration sensors, magnetic fieldsensors, or both.

A measurement of a quantity (x_(M)) may be expressed as the sum of thetrue value of that quantity (x) summed with a disturbance error term(ε), where the error may be a function of the well path, its attitude orits heading at the measurement location, and the position of the sensingmeans with respect to a source of disturbance (d_(D)). For example,d_(D) may be the position of a magnetic field sensor with respect to alocal magnetic disturbance field that may distort the components of theEarth's magnetic field which the magnetic field sensor is configured tomeasure.x _(M1) =x+ε ₁(I,A,d _(D1), . . . );  (Eq. 1)where x_(M1) is magnetic field measured by a first magnetic fieldsensor, x is the magnetic field of the Earth at the location of thefirst magnetic field sensor, and ε₁ is the disturbance error which canbe a function of tool azimuth angle (A), inclination (I), and thedistance (d_(D1)) of the magnetic sensor from a local magneticdisturbance field.

A second measurement of the quantity (x_(M)) at another location alongthe tool string may be expressed as:x _(M2) =x+ε ₂(I,A,d _(D2), . . . ).  (Eq.2)where x_(M2) is magnetic field measured by a second magnetic fieldsensor, x is the magnetic field of the Earth at the second magneticfield sensor location, and ε₂ is the disturbance error which can also bea function of azimuth (A), inclination (I) and the distance (d_(D2)) ofthe magnetic sensor with respect to a local magnetic disturbance field.

Taking the difference between the two measurements yields:Δx _(M) =x _(M1) −x _(M2)=ε₁(I,A,d _(D1), . . . )−ε₂(I,A,d _(D2), . . .).  (Eq. 3)

Thus, where the parameters affecting error terms are known, themeasurements may be generally used to estimate and correct for theerror. Certain embodiments described herein make use of measurementsfrom multiple acceleration sensors, multiple magnetic field sensors, orboth to correct for measurement errors. For example, accelerationsensors mounted on the downhole portion of a drill string can be used todetermine the inclination of the drill string. According to certainembodiments described herein, the use of measurements from multipleacceleration sensors may be used to determine inclination measurementerrors owing to the misalignment of the corresponding portions of thedrill string in which the sensors are mounted.

In certain embodiments, magnetic sensors included in a drill string canprovide measurements of the orientation of a downhole portion of thedrill string with respect to the magnetic field of the Earth. However,magnetized portions of the drill string can interfere with theorientation measurements causing measurement errors. In certainembodiments disclosed herein, data from multiple magnetic sensors may beused to determine the amount of magnetic interference caused by themagnetized portions of the drill string. In certain embodiments, themagnetic sensors may also be used to determine the proximity of thedrill string or a portion of the drill string to an existing well.

A. Comparison of Multiple Acceleration Measurements to Determine SensorMisalignment

FIG. 1 and FIG. 2 schematically illustrate an example downhole portion102 of a drill string 100 within a wellbore 104 having a firstacceleration sensor 106 and a second acceleration sensor 108 that aremisaligned relative to one another. In FIG. 1, the downhole portion 102is in a generally straight section of the wellbore 104, and in FIG. 2,the downhole portion 102 is in a curved or angled section of thewellbore 104. In certain embodiments, the drill string 100 may includean elongate portion 110, comprising sections of drill pipe and drillcollars, and a rotary steerable tool 112. In certain embodiments, thedrill string comprises a downhole portion 102 adapted to move within thewellbore 104. In certain embodiments, the downhole portion 102 includesa first portion 114 at a first position 116 within the wellbore 104. Incertain embodiments, the first portion 114 of the downhole portion 102is oriented at a first angle 121 relative to the wellbore 104 at thefirst position 116. The downhole portion 102 may further comprise asecond portion 118 at a second position 120 within the wellbore 104 andoriented at a second angle 122 relative to the wellbore 104 at thesecond position 120. At least one of the first angle 121 and the secondangle 122 is non-zero.

The drill string 100 may, in certain embodiments, be ameasurement-while-drilling string. In certain embodiments, the drillstring 100 can include a MWD instrumentation pack. In certainembodiments, the first acceleration sensor 106 is mounted within thefirst portion 114 (e.g., on the rotary steerable tool 112) and isadapted to generate a first signal indicative of the specific forceacceleration to which the first acceleration sensor 106 is subjected. Incertain embodiments, the second acceleration sensor 108 is mountedwithin the second portion 118 (e.g., on the elongate portion 110 of thedrill string 100) and is adapted to generate a second signal indicativeof the specific force acceleration sensed by the second accelerationsensor 108. In certain other embodiments, the first and secondacceleration sensors 106, 108 may be mounted on the downhole portion 102in other configurations compatible with embodiments described herein.For example, in some embodiments, both of the first and secondacceleration sensors 106, 108 are mounted on the elongate portion 110(e.g., in two MWD instrumentation packs spaced apart from one another oralongside one another). In other embodiments, both of the first andsecond acceleration sensors 106, 108 are mounted on the rotary steerabletool 112. In certain embodiments, one or more additional sensors (notshown) are located near the first sensor 106, the second sensor 108, orboth. For example, in some embodiments, a third sensor is located nearthe first sensor 106 and a fourth sensor is located near the secondsensor 108. In such an example, the fourth sensor may be mounted in aseparate MWD pack located alongside the MWD pack on which the secondsensor 108 is mounted.

In certain embodiments, the second position 120 can be spaced from thefirst position 116 by a non-zero distance B along the axis 130. Incertain embodiments, the distance B is about 40 feet. The distance B incertain other embodiments is about 70 feet. In certain embodiments, thesecond position 120 and the first position 116 are spaced apart from oneanother by a distance B in a range between about 40 feet to about 70feet. Other values of B are also compatible with certain embodimentsdescribed herein. In certain embodiments, the drill string 100 or thelogging string includes a sufficient number of sensors and adequatespacings between the first acceleration sensor 106 and the secondacceleration sensor 108 to perform the methods described herein.

In certain embodiments, the rotary steerable tool 112 comprises ahousing 126 containing at least one of the acceleration sensors 106,108. As schematically illustrated by FIG. 1, the housing 126 of certainembodiments contains the first acceleration sensor 106 while the secondacceleration sensor 108 is attached on or within the elongate portion110. The rotary steerable tool 112 of certain embodiments furthercomprises a drill bit 113 providing a drilling function. In certainembodiments, the downhole portion 102 further comprises portions such ascollars or extensions 128, which contact an inner surface of thewellbore 104 to position the housing 126 substantially collinearly withthe wellbore 104. In certain embodiments, the drill bit 113 of therotary steerable tool 112 is adapted to change direction, therebycreating a curvature in the wellbore 104 (FIG. 2) as the rotarysteerable tool 112 advances. Examples of such rotary steerable tools 112are described in UK Patent Application Publication No. GB2172324,entitled “Drilling Apparatus,” and UK Patent Application Publication No.GB2177738, entitled “Control of Drilling Courses in the Drilling of BoreHoles,” each of which is incorporated in its entirety by referenceherein.

In certain embodiments, the first acceleration sensor 106 and the secondacceleration sensor 108 comprise accelerometers currently used inconventional wellbore survey tools. For example, in certain embodiments,one or both of the first and second acceleration sensors 106, 108comprise one or more cross-axial accelerometers that can be used toprovide measurements for the determination of the inclination, thehigh-side tool face angle, or both, of the downhole instrumentation atintervals along the well path trajectory. In certain embodiments, one orboth of the first acceleration sensor 106 and the second accelerationsensor 108 comprise multiple (e.g., 2 or 3) single-axis accelerometers,each of which is sensitive to accelerations along a single sensingdirection. In certain such embodiments, one single-axis accelerometer ofthe multiple single-axis accelerometers is advantageously mounted sothat its sensing direction is substantially parallel with the axis 130of the downhole portion 102. In certain embodiments, one or both of thefirst acceleration sensor 106 and the second acceleration sensor 108comprise an accelerometer sensitive to accelerations in multipledirections (e.g., a multiple-axis accelerometer). For example, athree-axis acceleration sensor can be used which is capable of measuringaccelerations along the axis 130 of the downhole portion 102 and in twogenerally orthogonal directions in a plane (e.g., a cross-axial plane)that is generally perpendicular to the axis of the downhole portion 102.In certain embodiments, the x and y axes of the three-axis accelerometersensor are defined to lie in the cross-axial plane while the z axis ofthe three-axis accelerometer sensor is coincident with the axis of thewellbore 104 or the downhole portion 102. In certain such embodiments,the multiple-axis accelerometer is advantageously mounted so that it issensitive to accelerations along at least one direction parallel to theaxis 130 of the downhole portion 102.

In certain embodiments, the first acceleration sensor 106 and the secondacceleration sensor 108 are substantially identical. Exampleaccelerometers include, but are not limited to, quartz flexuresuspension accelerometers available from a variety of vendors. Othertypes of acceleration sensors are also compatible with certainembodiments described herein. In certain embodiments, more than twoacceleration sensors may be included in the drill string 100. The firstacceleration sensor 106 is also referred to as the “lower accelerationsensor” and the second acceleration sensor 108 is also referred to asthe “upper acceleration sensor” herein. The terms “upper” and “lower”are used herein merely to distinguish the two acceleration sensorsaccording to their relative positions along the wellbore 104, and arenot to be interpreted as limiting.

The drill string 100 in some embodiments includes a controller 124 whichcan be configured to calculate the difference between the first angle121 and the second angle 122. In the embodiment schematicallyillustrated by FIG. 1, the controller 124 is at the surface and iscoupled to the downhole portion 102 by the elongate portion 110. Incertain embodiments, the controller 124 comprises a microprocessoradapted to perform the method described herein for determining the sagmisalignment of the tool. In certain embodiments, the controller 124 isfurther adapted to determine the inclination and highside/toolface angleof the tool or the trajectory of the downhole portion 102 within thewellbore 104. In certain embodiments, the controller 124 furthercomprises a memory subsystem adapted to store at least a portion of thedata obtained from the various sensors. The controller 124 can comprisehardware, software, or a combination of both hardware and software. Incertain embodiments, the controller 124 comprises a standard personalcomputer.

In certain embodiments, at least a portion of the controller 124 islocated within the downhole portion 102. In certain other embodiments,at least a portion of the controller 124 is located at the surface andis communicatively coupled to the downhole portion 102 within thewellbore 104. In certain embodiments in which the downhole portion 102is part of a wellbore drilling system capable of measurement whiledrilling (MWD) or logging while drilling (LWD), signals from thedownhole portion 102 are transmitted by mud pulse telemetry orelectromagnetic (EM) telemetry. In certain embodiments where at least aportion of the controller 124 is located at the surface, the controller124 is coupled to the downhole portion 102 within the wellbore 104 by awire or cable extending along the elongate portion 110. In certain suchembodiments, the elongate portion 110 may comprise signal conduitsthrough which signals are transmitted from the various sensors withinthe downhole portion 102 to the controller 124. In certain embodimentsin which the controller 124 is adapted to generate control signals forthe various components of the downhole portion 102, the elongate portion110 is adapted to transmit the control signals from the controller 124to the downhole portion 102.

In certain embodiments, the controller 124 is adapted to perform apost-processing analysis of the data obtained from the various sensorsof the downhole portion 102. In certain such post-processingembodiments, data is obtained and saved from the various sensors of thedrill string 100 as the downhole portion 102 travels within the wellbore104, and the saved data are later analyzed to determine informationregarding the downhole portion 102. The saved data obtained from thevarious sensors advantageously may include time reference information(e.g., time tagging).

In certain other embodiments, the controller 124 provides a real-timeprocessing analysis of the signals or data obtained from the varioussensors of the downhole portion 102. In certain such real-timeprocessing embodiments, data obtained from the various sensors of thedownhole portion 102 are analyzed while the downhole portion 102 travelswithin the wellbore 104. In certain embodiments, at least a portion ofthe data obtained from the various sensors is saved in memory foranalysis by the controller 124. The controller 124 of certain suchembodiments comprises sufficient data processing and data storagecapacity to perform the real-time analysis.

One or more of the first angle 121 and the second angle 122 may be zerodegrees in certain embodiments. For example, as illustrated with respectto FIG. 1 and FIG. 2, the first portion 114 may be oriented at an angleof zero degrees with respect to the wellbore 104 at the first position106. In certain embodiments, at least one of the first angle 121 and thesecond angle 122 is non-zero. For example, as schematically illustratedin FIGS. 1 and 2, the second portion 118 may be oriented at a non-zeroangle with respect to the wellbore 104 at the second position 108. Invarious embodiments, one or both of the first angle 121 and the secondangle 122 may change during operation of the drill string 100. Incertain embodiments, the first angle 121 may be much smaller than angle122 or the second angle 122 may be much smaller than the first angle121. The difference between the first angle 121 and the second angle 122may also be referred to as misalignment or vertical misalignment. Incertain embodiments, the difference between the first angle 121 and thesecond angle 122 is less than about one degree. In certain embodiments,the difference between the first angle 121 and the second angle 122 isless than about 0.6 degrees. Other values of the difference between thefirst angle 121 and the second angle 122 are compatible with certainembodiments described herein. In certain embodiments, the differencebetween the first angle 121 and the second angle 122 may be caused bygravity-induced misalignment, commonly referred to as sag, of one partof the drill string 100 relative to another part of the drill string100. In some embodiments, the misalignment is caused by forces internalto the wellbore 104 such as compression of the drill string 100 withinthe wellbore 104, or by physical mounting misalignment of one of or bothof the first and second sensors 106, 108 on the drill string 100. Othercauses of the difference between the first angle 121 and the secondangle 122 are also compatible with certain embodiments described herein.

The size of the gravity-induced misalignment, the sag, is generallyproportional to the component of gravity perpendicular to the well pathin the vertical plane. In general, the inclination error (ΔI)attributable to sag is therefore assumed to be proportional to the sineof inclination (I). Thus, the inclination error of a segment of thedrill string 100 can be expressed as:ΔI=S·sin I;  (Eq. 4)where S is the sag/inclination error that is present at the segment ofthe drill string 100 when the wellbore 104 is horizontal.

Where there is a lower (first) sensor 106 and an upper (second) sensor108 mounted on the downhole portion 102 of the drill string 100 such asdescribed with respect to certain embodiments herein, and where therotary steerable tool 112 is assumed to be supported within the wellbore104 so that the lower sensor 106 aligned with the wellbore 104 (e.g.,the first angle 121 is zero), the sag of the upper sensor 108 can bedetermined using the following equations:I _(UM) =I _(U) +S sin·I _(U);  (Eq. 5)I _(LM) =I _(L);  (Eq. 6)where I_(U) and I_(L) are the true inclinations of the upper sensor 108and the lower sensor 106 respectively. I_(UM) and I_(LM) aremeasurements of these quantities obtained using the x, y and z (e.g.,along wellbore 104) measurements G_(X), G_(Y), G_(Z) provided by anorthogonal triad of accelerometers mounted at each sensor location. Forexample, the measured inclination can be calculated using the followingequation:

$\begin{matrix}{{I_{M} = {\arctan\left\lbrack \frac{\sqrt{G_{x}^{2} + G_{y}^{2}}}{G_{z}} \right\rbrack}};} & \left( {{Eq}.\mspace{14mu} 7} \right)\end{matrix}$

For a tangent well section, where the upper and lower sensors 108, 106are in alignment:I _(U) =I _(L) =I.  (Eq. 8)Hence,ΔI _(M) =I _(UM) −I _(UM) =S·sin I;  (Eq. 9)and an estimate of the horizontal sag may be obtained using:

$\begin{matrix}{S = {\frac{\Delta\; I_{M}}{\sin\; I}.}} & \left( {{Eq}.\mspace{14mu} 10} \right)\end{matrix}$

In the more general situation in which sag is present at the locationsof both the upper sensor 108 and the lower sensor 106, the processoutlined above can provide an estimate of the difference in sag betweenthe first and second portions 114, 118 of the downhole portion 102.

FIG. 2 schematically illustrates an example drill string 100 having afirst acceleration sensor 106 and a second acceleration sensor 108 thatare misaligned and where the drill string is in a portion of thewellbore 104 having a curvature (e.g., a bend or dogleg). The curvatureshown in FIG. 2 is such that the direction of the wellbore 104 changesby a non-zero angle θ. Where the drill string 100 is in a portion of thewellbore 104 having the curvature, the measured difference ininclination between the upper and lower sensors 108, 106 comprises aninclination difference indicative of the amount of curvature in additionto any inclination difference due to sag. In certain embodiments,information indicative of well curvature between the upper sensor 108and the lower sensor 106 can be used to determine an improvedcalculation of the sag. In order to provide information relating to theamount of curvature or bend, the drill string 100 may in certainembodiments include a bend sensor adapted to generate a third signalindicative of an amount of bend between the wellbore 104 at the firstposition 116 and the wellbore 104 at the second position 120. In certainembodiments, the controller 124 is further configured to calculate thedifference between the first angle 121 and the second angle 122 inresponse to the first, second, and third signals. Various types of bendsensors are compatible with certain embodiments described herein. Forexample, the bend sensor may be similar to the bend sensors described inU.S. patent application Ser. No. 11/866,213, entitled “System and MethodFor Measuring Depth and Velocity of Instrumentation Within a WellboreUsing a Bendable Tool,” which is incorporated in its entirety byreference herein. For example, the bend sensor of certain embodimentscomprises an optical system comprising a light source and a lightdetector separated from the light source by a non-zero distance alongthe wellbore 104. The light source can be configured to direct lighttowards the light detector such that light impinges upon a first portionof the light detector when the downhole portion 102 is in an unbentstate and upon a second portion of the light detector when the downholeportion 102 is in a bent state.

In certain embodiments, the controller 124 may be configured tocalculate the amount of bend between the wellbore 104 at the firstposition 116 and the wellbore 104 at the second position 120 in responseto the first and second signals using a predictive filtering technique.The predictive filtering technique, for example, may be a Kalmanfiltering technique, examples of which described herein. In variousembodiments, the filtering technique may be used instead of or inaddition to using a bend sensor to calculate the amount of bend.

A calculation of the sag which takes into account the bend, which may bemeasured by a bend sensor, can be made as follows. As described above:I _(UM) =I _(U) +S·sin I _(U);  (Eq. 11)I _(LM) =I _(L)  (Eq. 12)For a curved wellbore section,ΔI=I _(L) −I _(U) =δ·L;  (Eq. 13)where δ is the dogleg curvature (bend) of the wellbore between the uppersensor 108 and the lower sensor 106 and where L is the separationbetween the upper sensor 108 and the lower sensor 106. Hence,ΔI _(M) =I _(UM) −I _(UM) =S·sin I−δ·L;  (Eq. 14)and an estimate of the horizontal sag may now be obtained using:

$\begin{matrix}{S = {\frac{{\Delta\; I_{M}} + {\delta \cdot L}}{\sin\; I}.}} & \left( {{Eq}.\mspace{14mu} 15} \right)\end{matrix}$

FIG. 3 is a flowchart of an example method 300 of generating informationindicative of misalignment between the first and second accelerationsensors 106, 108 mounted within the downhole portion 102 of a drillstring 100 in accordance with certain embodiments described herein.While the method 300 is described herein by reference to the drillstring 100 schematically illustrated by FIG. 1 and by FIG. 2, otherdrill strings are also compatible with certain embodiments describedherein.

In certain embodiments, the method 300 comprises providing a drillstring 100 comprising a downhole portion 102 adapted to move within awellbore 104 in an operational block 302. The downhole portion 102comprises a first portion 114 at a first position 116 within thewellbore 104 and oriented at a first angle 121 relative to the wellbore104 at the first position 116. The downhole portion 102 also comprises asecond portion 118 at a second position 120 within the wellbore 104 andoriented at a second angle 122 relative to the wellbore 104 at thesecond position 120 wherein at least one of the first and second angles121, 122 is non-zero. The drill string 100 further comprises a firstacceleration sensor 106 mounted within the first portion 114. The firstacceleration sensor 106 is adapted to generate a first signal indicativeof an acceleration of the first acceleration sensor 106. The drillstring 100 further comprises a second acceleration sensor 108 mountedwithin the second portion 118, the second acceleration sensor 108adapted to generate a second signal indicative of an acceleration of thesecond acceleration sensor 108.

In certain embodiments, the method 300 further comprises generating thefirst signal and the second signal while the downhole portion 102 of thedrill string 100 is within the wellbore 104 in an operational block 304.In certain embodiments, the first and second signals are generated whilethe downhole portion 102 is moving within the wellbore 104.

In certain embodiments, the method 300 further comprises calculating thedifference between the first angle 121 and the second angle 122 in anoperational block 306. In certain embodiments, the method 300 comprisesstoring the difference between the first angle 121 and the second angle122 in an operational block 308. In certain embodiments, the method 300further comprises displaying the difference between the first angle 121and the second angle 122 in an operational block 310. For example, thefirst and second angles 121, 122 may be displayed on a monitor of apersonal computer outside the wellbore 104 at the surface in certainembodiments. In certain embodiments, the method 300 further comprisesmodifying a direction of drilling of the drill string 100 with respectto the wellbore 104 based on the difference between the first angle 121and the second angle 122 in an operational block 312. In certainembodiments, the direction can be changed automatically (e.g., by thecontroller in response to the calculated difference between the firstangle 121 and the second angle 122. In certain other embodiments, thedirection is changed by a user responding to the displayed difference.

FIG. 4 is a flowchart of an example method 400 of determining themisalignment between first and second acceleration sensors 106, 108mounted within a drill string 100 in accordance with certain embodimentsdescribed herein. While the method 400 is described herein by referenceto the drill string 100 schematically illustrated by FIGS. 1-2, otherdrill strings are also compatible with certain embodiments describedherein.

In certain embodiments, the method 400 comprises receiving one or moreacceleration measurements from a first acceleration sensor 106 in afirst portion 114 of the drill string 100 at a first position 116 withina wellbore 104 in an operational block 402. The first portion 114 isoriented at a first angle 121 relative the wellbore 104 at the firstposition 116. In certain embodiments, the method 400 further comprisesreceiving one or more acceleration measurements from a secondacceleration sensor 108 in a second portion 118 of the drill string 100at a second position 120 within the wellbore 104 in an operational block404. The second portion 118 is oriented at a second angle 122 relativeto the wellbore 104 at the second position 120, wherein at least one ofthe first and second angles 121, 122 is non-zero.

In certain embodiments, the method 400 further comprises calculating thedifference between the first angle 121 and the second angle 122 inresponse to the one or more acceleration measurements from the firstacceleration sensor 106 and the one or more measurements from the secondacceleration sensor 108 in the operational block 406. In certainembodiments, the method 400 further comprises storing the differencebetween the first angle 121 and the second angle 122. The method 400 ofcertain embodiments further comprises displaying the difference betweenthe first angle 121 and the second angle 122. For example, the first andsecond angles 121, 122 may be displayed on a monitor of a personalcomputer outside the wellbore 104 at the surface in certain embodiments.In certain embodiments, the method 400 further comprises modifying adirection of drilling of the drill string 100 with respect to thewellbore 104 based on the difference between the first angle 121 and thesecond angle 122.

An example calculation method for determining the misalignment betweenfirst and second acceleration sensors 106, 108 mounted within a downholeportion 102 of a drill string 100 utilizing a first acceleration sensor106 and a second acceleration sensor 108 is described herein. While theexample method described below utilizes a minimum number of variables,other embodiments are not limited to only these variables.

In the example method described below, the periodicity of themeasurements from the two accelerometer sensors define time periods or“epochs” whereby one set of accelerometer measurements are taken atevery epoch k. In certain embodiments, the upper and lower sensors 106,108 may be located in sensor packages which may be mounted on thedownhole portion 102 of the wellbore 104. Other embodiments distinguishthe two acceleration sensors from one another using other terms.

1. Example Method Utilizing Multiple Measurements to Correct ForMisalignment Due to Sag

In the example method described below, measurements of well pathinclination at the locations of the upper and lower accelerometersensors 108, 106 in a drill string 100 are compared with estimates ofthose quantities derived from a mathematical model of the system. Incertain embodiments, these quantities are combined in a recursivefiltering process which minimizes the variance of errors in the systemerror model and provide improved estimates of various systemcharacteristics including inclination, dogleg curvature (bend) of thewellbore 104, and sag of the upper and lower sensors 108, 106.

System Model

The example embodiment utilizes a state vector. The state vector x_(k)at time t_(k), for epoch k, may be expressed as follows:x _(k) =[I _(k)δ_(k) S _(L) S _(U)]^(T);  (Eq. 16)where,

I_(k)=the inclination mid-way between the two sensors 106, 108;

δ_(k)=the average dogleg curvature between the two sensors 106, 108;

S_(L)=horizontal sag for the lower sensor 106; and

S_(U)=horizontal sag for the upper sensor 108.

In certain embodiments, I_(k) and δ_(k) are time dependent states whileS_(L) and S_(U) are independent of time. Inclination predictions fromone epoch to the next may be expressed by the equation:I _(k)=I_(i−1) +ΔD _(k)·δ_(k−1);  (Eq. 17)where ΔD_(k) is the along-hole depth difference between epochs k−1 andk. The dogleg curvature is assumed to be nominally constant, which istrue in certain embodiments described herein. The state covariancematrix at epoch k may be expressed as follows:

$\begin{matrix}{{P_{k} = \begin{bmatrix}\sigma_{I,k}^{2} & \sigma_{{I\;\delta},k} & \sigma_{{IS}_{L},k} & \sigma_{{IS}_{U},k} \\\sigma_{{\delta\; I},k} & \sigma_{\delta,k}^{2} & \sigma_{{\delta\; S_{L}},k} & \sigma_{{\delta\; S_{U}},k} \\\sigma_{{S_{L}I},k} & \sigma_{{S_{L}\delta},k} & \sigma_{S_{L},k}^{2} & \sigma_{{S_{L}S_{U}},k} \\\sigma_{{S_{U}I},k} & \sigma_{{S_{U}\delta},k} & \sigma_{{S_{U}S_{L}},k} & \sigma_{S_{U},k}^{2}\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 18} \right)\end{matrix}$where σ² _(i,k) is the variance of parameter i in state vector x_(k),and σ_(ij,k) is the covariance between parameters i and j in statevector x_(k).

Initial values are assigned to the inclination and dogleg states inaccordance with the initial inclination measurements taken at the uppersensor 108 and lower sensor 106 locations, I_(U0) and I_(L0)respectively. Hence, the initial state at epoch 0 can be express asfollows:x _(k)=[(I _(L0) +I _(U0))/2 (I _(L0) −I _(U0))/L 0 0]^(T);  (Eq. 19)where L is the fixed distance between the two sensors 106, 108.

The covariance matrix P₀ for the initial state at epoch 0 can beexpressed as follows:

$\begin{matrix}{{P_{0} = \begin{bmatrix}\sigma_{I}^{2} & {\sigma_{I}^{2}/\left( {B\sqrt{2}} \right)} & 0 & 0 \\{\sigma_{I}^{2}/\left( {B\sqrt{2}} \right)} & {\sigma_{I}^{2}/L^{2}} & 0 & 0 \\0 & 0 & \sigma_{S_{L}}^{2} & 0 \\0 & 0 & 0 & \sigma_{S_{U}}^{2}\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 20} \right)\end{matrix}$where σ₁ is the uncertainty in the initial inclination mid-way betweenthe two accelerometer packages, and σ_(S) _(L) and σ_(S) _(U) are theuncertainties in the initial estimates of sag at the sensor locations.

The state vector x_(k−1) at epoch k−1 can be used to predict the statevector x_(k) at epoch k using the following equation:x _(k)=Φ_(k) ·x _(k−1);  (Eq. 21)where

$\begin{matrix}{\Phi_{k} = {\begin{bmatrix}1 & {\Delta\; D_{k}} & 0 & 0 \\0 & 1 & 0 & 0 \\0 & 0 & 1 & 0 \\0 & 0 & 0 & 1\end{bmatrix}.}} & \left( {{Eq}.\mspace{14mu} 22} \right)\end{matrix}$

The covariance matrix Q for the predicted state vector may be expressedby the following diagonal matrix:

$\begin{matrix}{{Q = \begin{bmatrix}\left( {p_{I}/\alpha} \right)^{2} & 0 & 0 & 0 \\0 & \left( {p_{\delta}/\alpha} \right)^{2} & 0 & 0 \\0 & 0 & 0 & 0 \\0 & 0 & 0 & 0\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 23} \right)\end{matrix}$where p₁ is the maximum change in inclination over the measurementupdate interval and p_(δ) is the maximum change in apparent dogleg overthe same time period. The elements of the matrix associated with the sagmay be set to zero owing to the fact that the horizontal sag for a giventool string will be constant. The parameter α is a multiplication factorbetween the standard deviation of a state vector element (σ) and themaximum change of the state vector element, such that the maximum changein the state vector element can be expressed as p=α·σ. In certainembodiments, this factor can vary from approximately 2 to approximately5. In other embodiments, this factor can vary within another rangecompatible with certain embodiments described herein.Measurement Equations

Measurements of well path inclination at the upper and lower sensorlocations 116, 120 in the drill string 100 may be extracted at regularintervals of time from the respective accelerometer measurements fromthe upper sensor 108 and the lower sensor 106, as described above. Theinclination measurements obtained at epoch k may be expressed as:

$\begin{matrix}{{z_{k} = \begin{bmatrix}I_{Lk} \\I_{Uk}\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 24} \right)\end{matrix}$whereI _(Lk)=an inclination measurement derived from the lower accelerationsensor 106 at epoch k; and  (Eq. 25)I _(Uk)=an inclination measurement derived from the upper accelerationsensor 108 package at epoch k;  (Eq. 26)

Estimates of the inclination at the locations of the upper and loweracceleration sensor 108, 106 at the upper and lower sensor locations120, 116 may be expressed in terms of the states of the model asfollows:

$\begin{matrix}{{\hat{z}}_{k} = {\begin{bmatrix}{I_{k} + {\delta_{K} \cdot {L/2}} + {S_{L} \cdot {\sin\left( {I_{k} + {\delta_{K} \cdot {L/2}}} \right)}}} \\{I_{k} - {\delta_{K} \cdot {L/2}} + {S_{U} \cdot {\sin\left( {I_{k} - {\delta_{K} \cdot {L/2}}} \right)}}}\end{bmatrix}.}} & \left( {{Eq}.\mspace{14mu} 27} \right)\end{matrix}$The differences between the inclination measurements and the estimatesof these quantities, denoted Δz_(k), can form the inputs to a Kalmanfilter, where:

$\begin{matrix}\begin{matrix}{{\Delta\; z_{k}} = {z_{k} - {\hat{z}}_{k}}} \\{= {\begin{bmatrix}{I_{Lk} - \left\{ {I_{k} + {\delta_{K} \cdot {L/2}} + {S_{L} \cdot {\sin\left( {I_{k} + {\delta_{K} \cdot {L/2}}} \right)}}} \right\}} \\{I_{Uk} - \left\{ {I_{k} - {\delta_{K} \cdot {L/2}} + {S_{U} \cdot {\sin\left( {I_{k} - {\delta_{K} \cdot {L/2}}} \right)}}} \right\}}\end{bmatrix}.}}\end{matrix} & \left( {{Eq}.\mspace{14mu} 28} \right)\end{matrix}$The measurement differences may be expressed in terms of the systemerror states, Δx_(k)=[ΔI_(k) Δδ_(k) ΔS_(L) ΔS_(U)]^(T), via thefollowing linear matrix equation:Δz _(k) =H _(k) ·Δx _(k) +v _(k);  (Eq. 29)where H_(k) is a 2×4 matrix in which the elements correspond to thepartial derivatives of the theoretical measurement equations:

$\begin{matrix}{{H_{11k} = {1 + {S_{L} \cdot {\cos\left( {I_{k} + {\delta_{k} \cdot {L/2}}} \right)}}}};} & \left( {{Eq}.\mspace{14mu} 30} \right) \\{{H_{12k} = {\frac{L}{2}\left\{ {1 + {S_{L} \cdot {\cos\left( {I_{k} + {\delta_{k} \cdot {L/2}}} \right)}}} \right\}}};} & \left( {{Eq}.\mspace{14mu} 31} \right) \\{{H_{13k} = {\sin\left( {I_{k} + {\delta_{k} \cdot {L/2}}} \right)}};} & \left( {{Eq}.\mspace{14mu} 32} \right) \\{{H_{14k} = 0};} & \left( {{Eq}.\mspace{14mu} 33} \right) \\{{H_{21k} = {1 + {S_{U} \cdot {\cos\left( {I_{k} - {\delta_{k} \cdot {L/2}}} \right)}}}};} & \left( {{Eq}.\mspace{14mu} 34} \right) \\{{H_{22k} = {{- \frac{L}{2}}\left\{ {1 + {S_{U} \cdot {\cos\left( {I_{k} - {\delta_{k} \cdot {L/2}}} \right)}}} \right\}}};} & \left( {{Eq}.\mspace{14mu} 35} \right) \\{{H_{23k} = 0};} & \left( {{Eq}.\mspace{14mu} 36} \right) \\{{H_{24k} = {\sin\left( {I_{k} - {\delta_{k} \cdot {L/2}}} \right)}};} & \left( {{Eq}.\mspace{14mu} 37} \right)\end{matrix}$and where v_(k) represents the noise in the inclination measurements.The covariance of the measurement noise process at epoch k can beexpressed by the following diagonal matrix:

$\begin{matrix}{{R_{k} = \begin{bmatrix}\sigma_{I_{L}k}^{2} & 0 \\0 & \sigma_{I_{U}k}^{2}\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 38} \right)\end{matrix}$where σ_(I) _(U) _(k) and σ_(I) _(L) _(k) are the uncertainties in theupper and lower inclination measurements, respectively.Filter Prediction Step

The covariance matrix corresponding to the uncertainty in the predictedstate vector may be expressed as follows:P _(k/k−1)=Φ_(k−1) ·P _(k−1/k−1)·Φ_(k−1) ^(T) +Q _(k−1);  (Eq. 39)where P_(k/k−1) is the covariance matrix at epoch k predicted at epochk−1, or the covariance matrix prior to the update which can bedetermined using the inclination measurements at epoch k. Since thesystem states may be corrected following each measurement update, a goodestimate of the state error following each measurement update can bezero. The predicted error state can also be zero in certain embodiments.Filter Measurement Update

The covariance matrix and the state vector can, in certain embodiments,be updated following a measurement at epoch k using the followingequations:P _(k/k) =P _(k/k−1) −G _(k) ·H _(k) ·P _(k/k−1);  (Eq. 40)x _(k/k) =x _(k/k−1) +G _(k) ·Δz _(k);  (Eq. 41)where P_(k/k) is the covariance matrix following the measurement updateat epoch k, x_(k/k−1) is the predicted state vector and x_(k/k) is thestate vector following the measurement update.

The gain matrix G_(k) can be expressed as:G _(k) =P _(k/k−1) ·H _(k) ^(T) [H _(k) ·P _(k/k−1) H _(k) ^(T) +R_(k)]⁻¹.  (Eq. 42)B. The Use of Multiple Magnetic Field Measurements to Determine MagneticInterference

A drilling system 200 of certain embodiments comprises magneticcomponents, such as ferromagnetic materials. The magnetic components canbe magnetized by one or more magnetic fields, such as, for example, themagnetic field of the Earth. In certain cases, some residualmagnetization will remain even after attempts to de-magnetize thesecomponents of the drilling system 200. FIG. 5 schematically illustratesan example drilling system 200 including a downhole portion 202comprising one or more magnetic regions 210 and one or more non-magneticregions 212. The downhole portion 202 moves along a first wellbore 204.The drilling system 200 of certain embodiments further comprises atleast two magnetic sensors 206, 208 within at least one non-magneticregion 212 of the downhole portion 202. The at least two magneticsensors 206, 208 comprise a first magnetic sensor 206 and a secondmagnetic sensor 208 spaced apart from one another by a non-zero distanceL. In certain embodiments, the first magnetic sensor 206 is adapted togenerate a first signal in response to magnetic fields of the Earth andof the one or more magnetic regions 210 of the tool string. The secondmagnetic sensor 208 is adapted to generate a second signal in responseto magnetic fields of the Earth and of the one or more magnetic regions210 of the tool string.

The downhole portion 202 of certain embodiments comprises a drillstring. The downhole portion 202 may include ameasurement-while-drilling string, for example. In certain embodiments,the drilling system 200 can include a MWD instrumentation pack. Incertain embodiments, one or more of the first and second magneticsensors 206, 208 is located within or mounted on the MWD instrumentationpack which may be mounted on an elongate portion 217 of the drillstring. In certain embodiments, one or more of the first and secondmagnetic sensors 206, 208 is mounted on a rotary steerable tool 218. Forexample, in the illustrated embodiment, the first magnetic sensor 206 ismounted on rotary steerable tool 218 and the second magnetic sensor 208is mounted on the elongate portion 217 of the drill string. In certainother embodiments, the first and second magnetic sensors 206, 208 may bemounted on the downhole portion 202 in various configurations compatiblewith embodiments described herein. For example, in some embodiments,both of the first and second magnetic sensors 206, 208 are mounted onthe elongate portion 217 (e.g., in two MWD instrumentation packs spacedfrom one another or alongside one another). In other embodiments, bothof the first and second magnetic sensors 206, 208 are mounted on therotary steerable tool 218. In certain embodiments, the drilling system200 includes a sufficient number of sensors and adequate spacingsbetween the first magnetic sensor 206 and the second magnetic sensor 208to perform the methods described herein.

In certain embodiments, the rotary steerable tool 218 comprises ahousing 220 containing at least one of the magnetic sensors 206, 208. Asschematically illustrated by FIG. 5, the housing 220 of certainembodiments contains the first magnetic sensor 206 while the secondmagnetic sensor 208 is attached on or within the elongate portion 217.The rotary steerable tool 218 of certain embodiments further comprises adrill bit 207. In certain embodiments, the downhole portion 202 issubstantially collinear with the wellbore 204.

In certain embodiments, the first and second magnetic sensors 206, 208may comprise an orthogonal triad of magnetometers which detect themagnetic field in the x, y, and z directions. In certain embodiments,the axial interference can be detected by the z-magnetometer while thecross-axial interference can be detected by the x and y magnetometers.The magnetometers may be of various types including flux gate sensors,solid state devices, or some other type of magnetometer. In certainembodiments, the first and second magnetic sensors 206, 208 are spacedapart from one another by a distance L. In some embodiments, thedistance L is about 40 feet. The distance L in certain other embodimentsis about 70 feet. In certain embodiments, the second magnetic sensor 208and the first magnetic sensor 206 are spaced apart from one another by adistance L in a range between about 40 feet to about 70 feet. In otherembodiments the distance L is another value compatible with certainembodiments described. In certain embodiments, more than two magneticsensors may be included in the drill string 100. The first magneticsensor 206 is also referred to as the “lower magnetic sensor” and thesecond magnetic sensor 208 is also referred to as the “upper magneticsensor” herein. The terms “upper” and “lower” are used herein merely todistinguish the two magnetic sensors 206, 208 according to theirrelative positions along the wellbore 204, and are not to be interpretedas limiting.

The drilling system 200 of certain embodiments further comprises acontroller 214 configured to receive the first signal and the secondsignal and to calculate the magnetic field of the one or more magneticregions 210. In the embodiment schematically illustrated by FIG. 5, thecontroller 214 is at the surface and is coupled to the downhole portion202 by the elongate portion 217. In certain embodiments, the controller214 comprises a microprocessor adapted to determine an estimate ofmagnetic interference from the drill string and corrected magneticinterference measurements which can be used to determine tool azimuthwith respect to magnetic north. In certain embodiments, the controller214 further comprises a memory subsystem adapted to store at least aportion of the data obtained from the various sensors. The controller214 can comprise hardware, software, or a combination of both hardwareand software. In certain embodiments, the controller 214 comprises astandard personal computer.

In certain embodiments, at least a portion of the controller 214 islocated within the downhole portion 202. In certain other embodiments,at least a portion of the controller 214 is located outside the wellbore104 at the surface and is communicatively coupled to the downholeportion 202 within the wellbore 204. In certain embodiments in which thedownhole portion 202 is part of a wellbore drilling system capable ofmeasurement while drilling (MWD) or logging while drilling (LWD),signals from the downhole portion 202 are transmitted by mud pulsetelemetry or electromagnetic (EM) telemetry. In embodiments where atleast a portion of the controller 214 is located outside the wellbore104 at the surface, the controller 214 is communicatively coupled to thedownhole portion 202 within the wellbore 204 by a wire or cable of theelongate portion 217. In certain such embodiments, the elongate portion217 comprises signal conduits through which signals are transmitted fromthe various sensors within the downhole portion 202 to the controller214. In certain embodiments in which the controller 214 is adapted togenerate control signals for the various components of the downholeportion 202, the elongate portion 217 is adapted to transmit the controlsignals from the controller 214 to the downhole portion 202.

In certain embodiments, the controller 214 is adapted to perform apost-processing analysis of the data obtained from the various sensorsof the downhole portion 202. In certain such post-processingembodiments, data is obtained and saved from the various sensors of thedrilling system 200 as the downhole portion 202 travels within thewellbore 204, and the saved data are later analyzed to determineinformation regarding the downhole portion 202. The saved data obtainedfrom the various sensors advantageously may include time referenceinformation (e.g., time tagging).

In certain other embodiments, the controller 214 provides a real-timeprocessing analysis of the signals or data obtained from the varioussensors of the downhole portion 202. In certain such real-timeprocessing embodiments, data obtained from the various sensors of thedownhole portion 202 are analyzed while the downhole portion 202 travelswithin the wellbore 204. In certain embodiments, at least a portion ofthe data obtained from the various sensors is saved in memory foranalysis by the controller 214. The controller 214 of certain suchembodiments comprises sufficient data processing and data storagecapacity to perform the real-time analysis.

In certain embodiments, the controller 214 is configured to calculate anaxial interference and hence to calculate an improved estimate of anazimuthal orientation of the downhole portion 202 with respect to themagnetic field of the Earth. In addition, and as described herein withrespect to FIG. 6, the controller 214 of certain embodiments is furtherconfigured to calculate an estimate of a relative location of a secondwellbore 230 spaced from the first wellbore 204.

In certain embodiments, the one or more non-magnetic regions 212 are notcompletely non-magnetic. For example, in some embodiments, thenon-magnetic regions 212 are less magnetic relative to the magneticregions 210 but may have some magnetic field associated with them. Thenon-magnetic regions 212 of certain embodiments comprise non-magneticdrill collars (“NMDCs”).

In certain embodiments, the downhole portion 202 of the drill stringincludes one or more collars 215 and the magnetic regions 210 of thedownhole portion 202 comprise two generally equal magnetic poles withopposite signs located near the ends 216 of the collars 215. Themagnetic regions 210 of certain embodiments generally comprise axialcomponents which are due to the magnetic poles and are substantiallyaligned with the wellbore 204 in the direction of drilling. Because thepoles of certain embodiments may not be precisely aligned with respectto the drill string axis, cross-axial components may also be present.However, because the misalignment of the poles may generally berelatively small in comparison to the axial distance between the polesand the first and second magnetic sensors 206, 208, the cross-axialcomponents are generally small in comparison to the axial components.The axial and/or cross-axial components of certain embodiments caninterfere with measurements of the azimuthal orientation of the downholeportion with respect to the magnetic field of the Earth.

In general, the magnetic regions (e.g., drill pipes or collars) nearestthe magnetic sensors 206, 208 can exhibit a significant effect on themagnetic measurements. The axial field strength at the magnetic sensors(dB_(a)) caused by the closest magnetic collar 215 can be given by:

$\begin{matrix}{{{d\; B_{a}} = {\frac{P_{D}}{4\pi} \cdot \left( {\frac{1}{L_{N}^{2}} - \frac{1}{\left( {L_{N} + L_{P}} \right)^{2}}} \right)}};} & \left( {{Eq}.\mspace{14mu} 43} \right)\end{matrix}$where P_(D) is the magnetic pole strength of the drill pipe, L_(P) isdistance between complementary poles (usually the length of a singledrill pipe or collar) and L_(N) is the length of the NMDC between themagnetic sensors and the nearest magnetic pole.

An axial field strength at the magnetic sensors resulting from theeffects of the magnetic drill pipes and collars 215 further up the drillstring can be given by the following approximate equation:

$\begin{matrix}{{{dB}_{a} \approx \frac{P_{D}}{4\;{\pi \cdot L_{N}^{2}}}};} & \left( {{Eq}.\mspace{14mu} 44} \right)\end{matrix}$

The magnetic field sensed by a magnetic sensor can be the combinedeffect of the Earth's magnetic field and the axial drill stringmagnetization (dB_(a)). The combined field generally may only differfrom the Earth's field in the axial (z-axis) direction, and cantherefore have the same effect as a z-magnetometer bias. The azimutherror can therefore given by:

$\begin{matrix}{{{dA} = {{- \frac{\sin\;{I \cdot \sin}\; A}{{B \cdot \cos}\;\theta}} \cdot {dB}_{a}}};} & \left( {{Eq}.\mspace{14mu} 45} \right)\end{matrix}$where B is the Earth's magnetic field strength, θ is the magnetic angleof dip and A is the magnetic azimuth angle.

In a straight section of a wellbore, a measured magnetic azimuth at theupper and lower measurement locations (A_(UM) and A_(LM)) (i.e., thelocations of the upper and lower magnetic sensors 208, 206) may beexpressed in terms of the true azimuth (A) and the axial magneticinterference at the two locations (dB_(aU), and dB_(aL)), as follows:

$\begin{matrix}{{A_{UM} = {A - {\frac{\sin\;{I \cdot \sin}\; A}{{B \cdot \cos}\;\theta} \cdot {dB}_{aU}}}};} & \left( {{Eq}.\mspace{14mu} 46} \right) \\{{{A_{LM} = {A - {\frac{\sin\;{I \cdot \sin}\; A}{{B \cdot \cos}\;\theta} \cdot {dB}_{aL}}}};}{where}} & \left( {{Eq}.\mspace{14mu} 47} \right) \\{{{dB}_{aU} = \frac{P_{D}}{4\;{\pi \cdot L_{N}^{2}}}},} & \left( {{Eq}.\mspace{14mu} 48} \right) \\{{{dB}_{aL} = \frac{P_{D}}{4\;{\pi \cdot \left( {L + L_{N}} \right)^{2}}}},} & \left( {{Eq}.\mspace{14mu} 49} \right)\end{matrix}$L is the distance between the two magnetic sensors, and L_(N) is thelength of the non-magnetic section above the upper magnetometer sensor208. Calculating the difference between the two azimuth measurementsyields:

$\begin{matrix}{{{{\Delta\; A_{M}} = {{A_{UM} - A_{LM}} = {{{- \frac{\sin\;{I \cdot \sin}\; A}{{B \cdot \cos}\;\theta}} \cdot \Delta}\;{dB}}}};}{where}} & \left( {{Eq}.\mspace{14mu} 50} \right) \\{{\Delta\;{dB}} = {{{dB}_{aU} - {dB}_{aL}} = {\frac{P_{D}}{4\;\pi} \cdot {\left( {\frac{1}{L_{N}^{2}} - \frac{1}{\left( {L + L_{N}} \right)^{2}}} \right).}}}} & \left( {{Eq}.\mspace{14mu} 51} \right)\end{matrix}$Hence, the disturbance pole strength may be determined using:

$\begin{matrix}{P_{D} = \frac{{B \cdot \cos}\;{\theta \cdot 4}\;{\pi \cdot \Delta}\; A_{M}}{\sin\;{I \cdot \sin}\;{A \cdot \left( {\frac{1}{L_{N}^{2}} - \frac{1}{\left( {L + L_{N}} \right)^{2}}} \right)}}} & \left( {{Eq}.\mspace{14mu} 52} \right)\end{matrix}$

Given knowledge of the axial interference through the example equationsoutlined above, it is possible to compensate for the interference usingembodiments of the disclosure provided herein.

FIG. 6 schematically illustrates a configuration in which the downholeportion 202 of the drilling system 200 is moving along a first wellbore204 and is positioned relative to a second wellbore 230 spaced from thefirst wellbore 204. In certain embodiments, the controller 214 isfurther configured to calculate an estimate of a relative location ofthe second wellbore 230 spaced from the first wellbore 204. Estimatingthe location of a second wellbore 230 may be useful to help avoidcollisions between, for example, a new wellbore 230 under constructionand an existing wellbore 204. The first wellbore 204 may also bedescribed as a new wellbore 104 and the second wellbore 230 may be alsodescribed as an existing wellbore 104 throughout the disclosure. Theterms new wellbore 104 and existing wellbore 104 are not intended to belimiting.

In addition, detecting the location of the second wellbore 230 may alsobe beneficial when it is desirable to intercept a second wellbore 230such as, for example, to drill a relief to intercept the second wellbore230. In general, as the downhole portion 202 approaches a secondwellbore 230, the presence of the second wellbore 230 can be detectedusing measurements from the first and second magnetic sensors 206, 208of the drilling system. For example, the first and second sensors 206,208 may be used to detect the azimuthal orientation of the drillingsystem 200 with respect to the magnetic field of the Earth. Theestimated azimuthal orientation may then be used to steer the drillingsystem 200. In accordance with certain embodiments described herein, themagnetic field resulting from the magnetized material in the secondwellbore 230 (e.g., in the casing string of an existing wellbore) may bedetected by the first and second sensors 206, 208 and extracted frommeasurements indicating the magnetic field of the Earth. These extractedvalues may then be used to determine the location of the second wellbore230 in certain embodiments.

Referring to FIG. 6, the angular separation between the two well pathscan be denoted by ψ. An axial field strength uncertainty at the lowermagnetic 206 can be caused by magnetized material in the second wellbore230 (e.g., in the casing string) and can be given by the followingapproximate equation:

$\begin{matrix}{{{dB}_{la} \approx {{{\frac{0.8\; L_{C}}{\left( {{4\; x^{2}} + L_{C}^{2}} \right)^{3/2}} \cdot P_{C} \cdot \cos}\;\psi} + {{\frac{0.9\; x}{\left( {{4\; x^{2}} + L_{C}^{2}} \right)^{3/2}} \cdot P_{C} \cdot \sin}\;\psi}}};} & \left( {{Eq}.\mspace{14mu} 53} \right)\end{matrix}$The cross-axial interference sensed at the lower magnetic sensor 206 canbe given by:

$\begin{matrix}{{{dB}_{lc} \approx {{{{- \frac{0.8\; L_{C}}{\left( {{4\; x^{2}} + L_{C}^{2}} \right)^{3/2}}} \cdot P_{C} \cdot \sin}\;\psi} + {{\frac{0.9\; x}{\left( {{4\; x^{2}} + L_{C}^{2}} \right)^{3/2}} \cdot P_{C} \cdot \cos}\;\psi}}};} & \left( {{Eq}.\mspace{14mu} 54} \right)\end{matrix}$where P_(C) represents the casing magnetic pole strength, L_(C)represents the average length of the casing sections, and x representsthe separation between the casing string and the lower magnetic sensor206 in the new wellbore 204.

The upper magnetic sensor 208 in the new wellbore 204 may also besubject to interference from the magnetic portions 210 of the casing inthe second wellbore 230. In certain embodiments, the magneticinterference will be lower for the situation shown in FIG. 6 where thenew wellbore 230 is approaching the existing wellbore 204 because theupper magnetic sensor is further from the source of magneticinterference (e.g., the casing of the existing wellbore). The axialfield strength uncertainty at the upper magnetic sensor 208 caused bycasing interference can be given by the following approximate equation:

$\begin{matrix}{{{dB}_{ua} \approx {{{\frac{0.8\; L_{C}}{\left( {{4\;\left( {x + {{L \cdot \sin}\;\psi}} \right)^{2}} + L_{C}^{2}} \right)^{3/2}} \cdot P_{C} \cdot \cos}\;\psi} + {{\frac{0.9\;\left( {x + {{L \cdot \sin}\;\psi}} \right)}{\left( {{4\;\left( {x + {{L \cdot \sin}\;\psi}} \right)^{2}} + L_{C}^{2}} \right)^{3/2}} \cdot P_{C} \cdot \sin}\;\psi}}};} & \left( {{Eq}.\mspace{14mu} 55} \right)\end{matrix}$while the cross-axial interference at this location can be given by:

$\begin{matrix}{{{dB}_{uc} \approx {{{{- \frac{0.8\; L_{C}}{\left( {{4\;\left( {x + {{L \cdot \sin}\;\psi}} \right)^{2}} + L_{C}^{2}} \right)^{3/2}}} \cdot P_{C} \cdot \sin}\;\psi} + {{\frac{0.9\;\left( {x + {{L \cdot \sin}\;\psi}} \right)}{\left( {{4\;\left( {x + {{L \cdot \sin}\;\psi}} \right)^{2}} + L_{C}^{2}} \right)^{3/2}} \cdot P_{C} \cdot \cos}\;\psi}}};} & \left( {{Eq}.\mspace{14mu} 56} \right)\end{matrix}$where L is the separation of the two magnetic instruments along the toolstring. Based on these two sets of magnetic readings, four equationshaving three unknowns (P, x and ψ) may be generated. Therefore, it ispossible in certain embodiments to determine the unknown parameters bysolving the equations. For example, in one embodiment, a least squaresadjustment procedure may be used to compute these values.

Using certain embodiments described herein, the difference between twoupper and lower measurements generally increases as the new wellbore 204approaches the existing wellbore 230. In general, when the new wellbore204 approaches the existing wellbore 230 along a perpendicular path, thedifference in the field measurements between the upper and lowermagnetic sensors 208, 206 will be the greatest. As will be appreciatedby skilled artisans from the disclosure provided herein, certainembodiments described herein can use the calculated difference in themagnetic fields sensed by the upper and lower magnetic sensors 208, 206to determine the changing separation distance between the new well 204and an existing well 230 and to use this information either to avoid acollision between the new well 204 and an existing wellbore 230, or tocause the new well 204 to intercept an existing wellbore 230. Forexample, where a new wellbore 204 approaches an existing wellbore 230along a path perpendicular to the existing wellbore 230, themagnetization resulting from the second wellbore 230 and detected by thefirst and second magnetic sensors 206, 208 in the new wellbore 204 aregenerally influenced by the same sets of poles in the existing wellbore230. However, when the new wellbore 204 is approaching the existingwellbore 230 along a non-perpendicular angle, as shown in FIG. 4, thegroup of magnetic poles from the second wellbore 230 influencing themagnetic field measured by the first magnetic sensor 206 may bedifferent from the group of magnetic poles influencing the magneticfield measured by the second magnetic sensor 208. Whether different setsof magnetic poles are detected by the first and second sensors 206, 208can depend, for example, on relative separation and can also vary withtime as the drilling system 200 moves with respect to the secondwellbore 230.

In certain embodiments, the first and second magnetic sensors 206, 208can also be used during the construction of a new wellbore 204 in closeproximity to an existing wellbore 230. For example, when a drillingsystem 200 in a new wellbore 204 is moving parallel to an existingwellbore, the magnetic field measurements from the first and secondmagnetic sensors 206, 208 may generally be represented by signals havingsimilar magnitude but varying phase. The relative phase of the twosignals can depend, for example, on the spacing between the two magneticsensors 206, 208 and the length of the casing in the existing well. Incertain embodiments, the drilling system 200 can detect a differencebetween the measurements of the first and second magnetic sensors 206,208 which indicates that the new wellbore 204 is becoming closer to oris diverging from the existing well 230. In certain embodiments, thisindication can be used to direct the drilling system 200 to drill thenew wellbore 104 in a direction substantially parallel to the existingwellbore.

FIG. 7 is a flowchart of an example method 700 of generating informationindicative of the magnetic field in a first wellbore 204 in accordancewith certain embodiments described herein. In certain embodiments, themethod 700 comprises providing a drilling system 200 in an operationalblock 702. The drilling system 200 of some embodiments comprises adownhole portion 202 adapted to move along a first wellbore 204. Thedownhole portion 202 can include one or more magnetic regions 210 andone or more non-magnetic regions 212. The drilling system 200 furthercomprises at least two magnetic sensors 206, 208 within at least onenon-magnetic region 212 of the downhole portion 202. The at least twomagnetic sensors 206, 208 comprise a first magnetic sensor 206 and asecond magnetic sensor 208 spaced apart from one another by a non-zerodistance L in certain embodiments. The first magnetic sensor 206 incertain embodiments is adapted to generate a first signal in response tomagnetic fields of the Earth and of the one or more magnetic regions 210of the drill string. In some embodiments, the second magnetic sensor 208is adapted to generate a second signal in response to magnetic fields ofthe Earth and of the one or more magnetic regions 210 of the drillstring.

In an operational block 704, the method 700 of some embodiments furthercomprises generating the first signal and the second signal while thedownhole portion 202 of the drilling system 200 is at a first locationwithin the first wellbore 204. In certain embodiments, the method 700further includes calculating the magnetic field in the first wellbore204 in response to the first and second signals in an operational block706. In certain embodiments, the method 700 further comprises using thecalculated magnetic field to calculate an axial interference and henceto calculate an improved estimate of an azimuthal orientation of thedownhole portion 202 with respect to the magnetic field of the Earth atoperational block 708. The method 700 of some embodiments comprisesusing the calculated magnetic field to calculate an estimate of arelative location of a second wellbore 230 spaced from the firstwellbore 204.

FIG. 8 is a flowchart of an example method 800 for determining themagnetic field in a wellbore 204 in accordance with certain embodimentsdescribed herein. In certain embodiments, the method 800 comprisesreceiving one or more magnetic measurements from at least two magneticsensors 206, 208 within at least one non-magnetic region 212 of thedownhole portion 202 of a drilling system 200 in an operational block802. In certain embodiments, the at least two magnetic sensors 206, 208comprise a first magnetic sensor 206 and a second magnetic sensor 208spaced apart from one another by a non-zero distance L. In certainembodiments, the first magnetic sensor 206 generates a first signal inresponse to magnetic fields from the Earth and from one or more magneticregions 210 of the downhole portion 202. In certain embodiments, thesecond magnetic sensor 208 generates a second signal in response tomagnetic fields from the Earth and from the one or more magnetic regions210.

In an operational block 804, the method 800 of some embodiments furthercomprises calculating the magnetic field in response to the one or moremagnetic measurements from the at least two magnetic sensors 206, 208.In certain embodiments, in an operational block 806, the method 800further comprises using the calculated magnetic field to calculate anaxial interference and hence to calculate an improved estimate of anazimuthal orientation of the downhole portion 202 with respect to themagnetic field of the Earth. In some embodiments, the method 800 furthercomprises using the calculated magnetic field to calculate an estimateof a relative location of a second wellbore 230 spaced from the wellbore204.

An example calculation method for determining and correcting for axialmagnetization compatible with embodiments of the disclosure is describedbelow. While the example method has a minimum number of variables, otherembodiments are not limited to only these variables. Additionalvariables may also be used, including, but not limited to, velocitiesand/or depths of the downhole portion of the wellbore 204. In certainembodiments, the units of the parameters and variables below are inmeters-kilogram-second (MKS) units.

In the example method described below, the periodicity of themeasurements from the two magnetic sensors 206, 208 define time periodsor “epochs” whereby one set of magnetic measurements are taken at everyepoch k. In certain embodiments, the upper and lower magnetic sensors208, 206 may be located in sensor packages which may be mounted on thedownhole portion 202 of the wellbore 204. Other embodiments distinguishthe two magnetic sensors from one another using other terms.

1. Example Method Utilizing Multiple Measurements to Correct For AxialMagnetization

In the example method described below, measurement of magnetic azimuthbased on measurements from the upper and lower magnetic sensors 208, 206in a drilling system 200 are compared with estimates of those quantitiesderived from a mathematical model of the system to provide adetermination and correction of axial magnetic interference. In certainembodiments, these quantities are combined in a recursive filteringprocess which minimizes the variance of errors in the system error modeland provide improved estimates of various system characteristicsincluding magnetic azimuth (A) and drill string pole strength (P_(D)).

System Model

A state vector x_(k) at epoch k, can be expressed as follows:x _(k) =[A _(k) P _(D)]^(T);  (Eq. 57)whereA _(k)=magnetic azimuth mid-way between the two magnetic sensors (e.g.,two magnetometer packages); and  (Eq. 58)P _(D)=drill string pole strength.  (Eq. 59)A_(k) is time dependent while P_(D) is independent of time. Azimuthdoglegs are assumed to be small in the example method and are thereforeignored.

The initial value assigned to the azimuth state may be the mean of theazimuth readings obtained for the upper and lower magnetometerlocations, A_(U0) and A_(L0), respectively, assuming any small doglegcurvature that does exist is fixed between these two drill pipelocations. Hence, the initial state at epoch 0 can be given by thefollowing equation:x _(k)=[(A _(L0) +A _(U0))/2 0]^(T);  (Eq. 60)The covariance matrix P₀ for the initial state at epoch 0 can beexpressed as follows:

$\begin{matrix}{{P_{0} = \begin{bmatrix}\sigma_{A}^{2} & 0 \\0 & \sigma_{P_{D}}^{2}\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 61} \right)\end{matrix}$where σ_(A) is the uncertainty in the initial azimuth approximatelymid-way between the two magnetic sensors 206, 208 and σ_(P) _(D) is theuncertainty in the initial estimate of the pole strength.

The state vector x_(k−1) at epoch k−1 can be used to predict the statevector x_(k) at epoch k using the following equation:x _(k) =x _(k−1);  (Eq. 62)The covariance matrix Q for the predicted state vector can be given bythe following diagonal matrix:

$\begin{matrix}{{Q = \begin{bmatrix}\left( {p_{A}/\alpha} \right)^{2} & 0 \\0 & 0\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 63} \right)\end{matrix}$where p_(A) is the maximum change in azimuth over the measurement updateinterval. The drill-string pole strength can be assumed to be constantand the matrix element associated with this state can therefore be setto zero. The parameter α is a multiplication factor between the standarddeviation of a state vector element (σ) and the maximum change of thestate vector element such that the maximum change in the state vectorelement can be expressed as p=α·σ. In certain embodiments, this factorcan vary from approximately 2 to approximately 5 in one embodiment. Inother embodiments, this factor can vary within another range compatiblewith certain embodiments described herein.Measurement Equations

Measurements of the well path azimuth based on the respective magneticsensor measurements at the upper and lower locations of the magneticsensors 206, 208 in the drill string may be extracted at generallyregular intervals of time. The inclination measurements obtained atepoch k may be expressed as:

$\begin{matrix}{{z_{k} = \begin{bmatrix}A_{Lk} \\A_{Uk}\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 64} \right)\end{matrix}$whereA _(Lk)=the azimuth measurement derived from the lower magnetometerpackage at epoch k;  (Eq. 65)A _(Uk)=the azimuth measurement derived from the upper magnetometerpackage at epoch k;  (Eq. 66)

Estimates of the azimuth at the upper and lowermagnetometer/accelerometer package locations based on the model may beexpressed in terms of the states of the model as follows:

$\begin{matrix}{{{\hat{z}}_{k} = \begin{bmatrix}{A_{k} + {\sin\;{I_{Lk} \cdot \sin}\;{A_{k} \cdot {P_{D}/\left( {4 \cdot \pi \cdot B_{H} \cdot \left( {L + L_{N}} \right)^{2}} \right)}}}} \\{A_{k} + {\sin\;{I_{Uk} \cdot \sin}\;{A_{k} \cdot {P_{D}/\left( {4 \cdot \pi \cdot B_{H} \cdot L_{N}^{2}} \right)}}}}\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 67} \right)\end{matrix}$Differences between the azimuth measurements and the estimates of thesequantities, denoted Δz_(k), form the inputs to a Kalman filter, where:

${{\Delta\; z_{k}} = {{z_{k} - {\hat{z}}_{k}} = \begin{bmatrix}{A_{Lk} - \begin{Bmatrix}{A_{k} + {\sin\;{I_{Lk} \cdot \sin}\;{A_{k} \cdot {P_{D}/}}}} \\\left( {4 \cdot \pi \cdot B_{H} \cdot \left( {L + L_{N}} \right)^{2}} \right)\end{Bmatrix}} \\{A_{Uk} - \begin{Bmatrix}{A_{k} + {\sin\;{I_{Uk} \cdot \sin}\;{A_{k} \cdot {P_{D}/}}}} \\\left( {4 \cdot \pi \cdot B_{H} \cdot L_{N}^{2}} \right)\end{Bmatrix}}\end{bmatrix}}};$The measurement differences may be expressed in terms of the systemerror states, via the following linear matrix equation:Δz _(k) =H _(k) ·Δx _(k) +v _(k);  (Eq. 68)where H_(k) comprises a 2×2 matrix in which the elements correspond tothe partial derivatives of the theoretical measurement equations:H _(11k)=1+sin I _(Lk)·cos A _(k) ·P _(D)/(4·π·B _(H)·(L+L_(N))²);  (Eq. 69)H _(12k)=sin I _(Lk)·cos A _(k)/(4·π·B _(H)·(L+L _(N))²);  (Eq. 70)H _(21k)=1+sin I _(Uk)·cos A _(k) ·P _(D)/(4·π·B _(H) ·L _(N) ²);and  (Eq. 71)H _(22k)=sin I _(Uk)·cos A _(k)/(4·π·B _(H) ·L _(N) ²);  (Eq. 72)and where v_(k) represents noise in the azimuth measurements. Thecovariance of the measurement noise process at epoch k can be given bythe following diagonal matrix:

$\begin{matrix}{{R_{k} = \begin{bmatrix}\sigma_{A_{L}k}^{2} & 0 \\0 & \sigma_{A_{U}k}^{2}\end{bmatrix}};} & \left( {{Eq}.\mspace{14mu} 73} \right)\end{matrix}$where σ_(A) _(U) _(k) and σ_(A) _(L) _(k) comprise the uncertainties inthe upper and lower azimuth measurements, respectively.

In certain embodiments, the above system and measurement equations canbe used to implement the filtering process as follows.

Filter Prediction Step

The covariance matrix corresponding to the uncertainty in the predictedstate vector can be given by:P _(k/k−1) =P _(k−1/k−1) +Q _(k−1);  (Eq. 74)Filter Measurement Update

The covariance matrix and the state vector are updated following ameasurement at epoch k using the following equations:P _(k/k) =P _(k/k−1) −G _(k) ·H _(k) ·P _(k/k−1);  (Eq. 75)x _(k/k) =x _(k/k−1) +G _(k) ·Δz _(k); and  (Eq. 76)G _(k) =P _(k/k−1) ·H _(k) ^(T) [H _(k) ·P _(k/k−1) ·H _(k) ^(T) +R_(k)]⁻¹.  (Eq. 77)

Certain embodiments described herein provide a measure of themisalignment of multiple acceleration sensors mounted in the downholeportion of a drill string. In certain embodiments, the measure of themisalignment corresponds to a measure of sag which can be used toprovide an improved estimate of the inclination of the downhole portionof the drill string and/or the wellbore. In certain embodiments, themeasurements are based entirely on the use of down-hole sensors, and areindependent of any surface measurement devices which are subject toerror in the detection of true down-hole location and movement. In orderto provide an improved determination of the trajectory and position ofthe downhole portion of the drill string, certain embodiments describedherein may be used in combination with a system capable of determiningthe depth, velocity, or both, of the downhole portion. Examples of suchsystems are described in U.S. Pat. No. 7,350,410, entitled “System andMethod for Measurements of Depth and Velocity of Instrumentation Withina Wellbore,” and U.S. patent application Ser. No. 11/866,213, entitled“System and Method For Measuring Depth and Velocity of InstrumentationWithin a Wellbore Using a Bendable Tool,” each of which is incorporatedin its entirety by reference herein.

In certain embodiments, a processing algorithm based on a mathematicalmodel of wellbore curvature (dogleg), inclination, and misalignment ofsensors mounted in the wellbore is used to provide an improved estimateof the inclination of the downhole portion of a drill string and/orwellbore. The measurements generated by the multiple accelerometers incertain embodiments can be compared with estimates of the samequantities derived from the states of the model. These measurementdifferences can form the inputs to the processing algorithm whicheffectively cause the outputs of the model to be driven into coincidencewith the measurements, thus correcting the outputs of the model. Incertain embodiments, estimates of the misalignment error are based onmeasurements from each location as the drill string traverses the pathof the wellbore. The measurement accuracy in certain such embodiments isenhanced by the use of the independent measurements of well curvature orinclination, obtained in the vicinity of the sensor locations, therebyincreasing the accuracy and reliability of the estimation algorithm.

Certain embodiments described herein provide an estimate of the magneticinterference incident upon multiple magnetic sensors mounted within anon-magnetic region of the downhole portion of a drilling system. Incertain such embodiments, the interference components result frommagnetic fields incident upon the sensors which are not from themagnetic field of the Earth. Certain embodiments utilize the magneticmeasurements to determine an axial interference resulting from one ormore magnetic portions of the downhole portion and to provide animproved estimate of the azimuthal orientation of the downhole portionwith respect to the magnetic field of the Earth. Certain embodimentsutilize a processing algorithm based on a mathematical model of magneticazimuth mid-way between two magnetic sensors and drill string polestrength. The measurements generated by the two magnetic sensors incertain embodiments can be compared with estimates of the samequantities derived from the states of the model. These measurementdifferences can form the inputs to the processing algorithm whicheffectively cause the outputs of the model to be driven into coincidencewith the measurements, thus correcting the outputs of the model.

In certain embodiments, the magnetic measurements are used to detectmagnetic fields from sources other than magnetic regions in the downholeportion of the drill string, such as, for example, from magnetic regionsin a second wellbore. In certain such embodiments, the magneticmeasurements are used to detect the location of the second wellborerelative to the first wellbore.

Various embodiments have been described above. Although described withreference to these specific embodiments, the descriptions are intendedto be illustrative and are not intended to be limiting. Variousmodifications and applications may occur to those skilled in the artwithout departing from the true spirit and scope of the invention asdefined in the appended claims.

1. A drill string, comprising: a downhole portion adapted to move withina wellbore, the downhole portion hag a first portion at a first positionwithin the wellbore and oriented at a first angle relative to thewellbore at the first position and a second portion at a second positionwithin the wellbore and oriented at a second angle relative to thewellbore at the second position, wherein at least one of the first andsecond angles is non-zero; a first acceleration sensor mounted withinthe first portion, the first acceleration sensor adapted to generate afirst signal indicative of an acceleration of the first accelerationsensor; and a second acceleration sensor mounted within the secondportion, the second acceleration sensor adapted to generate a secondsignal indicative of an acceleration of the second acceleration sensor,wherein a difference between the first angle and the second angle is dueto gravity induced sag and is less than about one degree.
 2. A drillstring, comprising: a downhole portion adapted to move within awellbore, the downhole portion having a first portion at a firstposition within the wellbore and oriented at a first angle relative tothe wellbore at the first position and a second portion at a secondposition within the wellbore and oriented at a second angle relative tothe wellbore at the second position, wherein at least one of the firstand second angles is non-zero; a first acceleration sensor mountedwithin the first portion, the first acceleration sensor adapted togenerate a first signal indicative of an acceleration of the firstacceleration sensor; a second acceleration sensor mounted within thesecond portion, the second acceleration sensor adapted to generate asecond signal indicative of an acceleration of the second accelerationsensor; and a controller configured to calculate the difference betweenthe first angle and the second angle.
 3. A drill string, comprising: adownhole portion adapted to move within a wellbore, the downhole portionhaving a first portion at a first position within the wellbore andoriented at a first angle relative to the wellbore at the first positionand a second portion at a second position within the wellbore andoriented at a second angle relative to the wellbore at the secondposition, wherein at least one of the first and second angles isnon-zero; a first acceleration sensor mounted within the first portion,the first acceleration sensor adapted to generate a first signalindicative of an acceleration of the first acceleration sensor; and asecond acceleration sensor mounted within the second portion, the secondacceleration sensor adapted to generate a second signal indicative of anacceleration of the second acceleration sensor, wherein the first andsecond acceleration sensors are spaced apart from one another by adistance in a range between about 40 feet to about 70 feet.
 4. The drillstring of claim 2, wherein the drill string is ameasurement-while-drilling string.
 5. The drill string of claim 2,further comprising a bend sensor adapted to generate a third signalindicative of an amount of bend between the wellbore at the firstposition and the wellbore at the second position.
 6. The drill string ofclaim 5, wherein the controller is further configured to calculate adifference between the first angle and the second angle in response tothe first, second, and third signals.
 7. The drill string of claim 5,wherein the bend sensor comprises an optical system comprising a lightsource and a light detector separated from the light source by anon-zero distance along the wellbore, the light source configured todirect light towards the light detector, the light impinging upon afirst portion of the light detector when the downhole portion is in anunbent state and upon a second portion of the light detector when thedownhole portion is in a bent state.
 8. The drill string of claim 2,wherein the controller is further configured to calculate the amount ofbend between the wellbore at the first position and the wellbore at thesecond position in response to the first and second signals using apredictive filtering technique.
 9. The drill string of claim 8, whereinthe predictive filtering technique comprises Kalman filtering.
 10. Amethod for generating information indicative of misalignment betweenfirst and second acceleration sensors mounted within the downholeportion of a drill string, the method comprising: providing a drillstring comprising: a downhole portion adapted to move within a wellbore,the downhole portion having a first portion at a first position withinthe wellbore and oriented at a first angle relative to the wellbore atthe first position and a second portion at a second position within thewellbore and oriented at a second angle relative to the wellbore at thesecond position wherein at least one of the first and second angles isnon-zero; a first acceleration sensor mounted within the first portion,the first acceleration sensor adapted to generate a first signalindicative of an acceleration of the first acceleration sensor; and asecond acceleration sensor mounted within the second portion, the secondacceleration sensor adapted to generate a second signal indicative of anacceleration of the second acceleration sensor; generating the firstsignal and the second signal while the downhole portion of the drillstring is within the wellbore; and calculating the difference betweenthe first angle and the second angle.
 11. The method of claim 10,further comprising storing the difference between the first angle andthe second angle.
 12. The method of claim 10, further comprisingdisplaying the difference between the first angle and the second angle.13. The method of claim 10, further comprising modifying a direction ofdrilling of the drill string with respect to the wellbore based on thedifference between the first angle and the second angle.
 14. A method ofdetermining the misalignment between first and second accelerationsensors mounted within a drill string, the method comprising: receivingone or more acceleration measurements from a first acceleration sensorin a first portion of the drill string at a first position within awellbore, the first portion oriented at a first angle relative thewellbore at the first position; receiving one or more accelerationmeasurements from a second acceleration sensor in a second portion ofthe drill string at a second position within the wellbore, the secondportion oriented at a second angle relative to the wellbore at thesecond position, wherein at least one of the first and second angles isnon-zero; and calculating the difference between the first angle and thesecond angle in response to the one or more acceleration measurementsfrom the first acceleration sensor and the one or more measurements fromthe second acceleration sensor.
 15. A drilling system, comprising: adownhole portion adapted to move along a first wellbore, the downholeportion comprising one or more magnetic regions and one or morenon-magnetic regions; at least two magnetic sensors within at least onenon-magnetic region of the downhole portion, the at least two magneticsensors comprising a first magnetic sensor and a second magnetic sensorspaced apart from one another by a non-zero distance, the first magneticsensor adapted to generate a first signal in response to magnetic fieldsof the Earth and of the one or more magnetic regions, the secondmagnetic sensor adapted to generate a second signal in response tomagnetic fields of the Earth and of the one or more magnetic regions;and a controller configured to receive the first signal and the secondsignal and to calculate the magnetic field of the one or more magneticregions.
 16. The drilling system of claim 15, wherein the controller isconfigured to calculate an axial interference and hence to calculate animproved estimate of an azimuthal orientation of the downhole portionwith respect to the magnetic field of the Earth.
 17. The drilling systemof claim 15, wherein the controller is configured to calculate anestimate of a relative location of a second wellbore spaced from thefirst wellbore.
 18. The drilling system of claim 15, wherein the firstand second magnetic sensors are spaced apart from one another by adistance in a range between about 40 feet to about 70 feet.
 19. Thedrilling system of claim 15, wherein the downhole portion comprises adrill string.
 20. The drilling system of claim 15, wherein the downholeportion comprises a measurement-while-drilling string.
 21. A method forgenerating information indicative of the magnetic field in a firstwellbore, the method comprising: providing a drilling system comprising:a downhole portion adapted to move along a first wellbore, the downholeportion comprising one or more magnetic regions and one or morenon-magnetic regions; and at least two magnetic sensors within at leastone non-magnetic region of the downhole portion, the at least twomagnetic sensors comprising a first magnetic sensor and a secondmagnetic sensor spaced apart from one another by a non-zero distance,the first magnetic sensor adapted to generate a first signal in responseto magnetic fields of the Earth and of the one or more magnetic regions,the second magnetic sensor adapted to generate a second signal inresponse to magnetic fields of the Earth and of the one or more magneticregions; generating the first signal and the second signal while thedownhole portion of the drilling system is at a first location withinthe first wellbore; and calculating the magnetic field in the firstwellbore in response to the first and second signals.
 22. The method ofclaim 21, further comprising using the calculated magnetic field tocalculate an axial interference and hence to calculate an improvedestimate of an azimuthal orientation of the downhole portion withrespect to the magnetic field of the Earth.
 23. The method of claim 21,further comprising using the calculated magnetic field to calculate anestimate of a relative location of a second wellbore spaced from thefirst wellbore.
 24. A method for determining the magnetic field in awellbore, the method comprising: receiving one or more magneticmeasurements from at least two magnetic sensors within at least onenon-magnetic region of a downhole portion of a drilling system, the atleast two magnetic sensors comprising a first magnetic sensor and asecond magnetic sensor spaced apart from one another by a non-zerodistance, the first magnetic sensor generating a first signal inresponse to magnetic fields of the Earth and of one or more magneticregions of the downhole portion, the second magnetic sensor generating asecond signal in response to magnetic fields of the Earth and of the oneor more magnetic regions; and calculating the magnetic field in responseto the one or more magnetic measurements from the at least two magneticsensors.
 25. The method of claim 24, further comprising using thecalculated magnetic field to calculate an axial interference and henceto calculate an improved estimate of an azimuthal orientation of thedownhole portion with respect to the magnetic field of the Earth. 26.The method of claim 24, further comprising using the calculated magneticfield to calculate an estimate of a relative location of a secondwellbore spaced from the wellbore.
 27. The drill string of claim 1,wherein the difference between the first angle and the second angle isless than about 0.6 degrees.
 28. The drill string of claim 1, whereinthe first angle is zero degrees and the second angle is a value otherthan zero degrees.
 29. The drill string of claim 3, wherein thedifference between the first angle and the second angle is less thanabout 1 degree.
 30. The drill string of claim 29, wherein the differencebetween the first angle and the second angle is less than about 0.6degrees.
 31. The drill string of claim 3, wherein the first and secondacceleration sensors are spaced apart by about 40 feet.
 32. The drillstring of claim 3, wherein the first and second acceleration sensors arespaced apart by about 70 feet.
 33. The drill string of claim 2, whereinthe difference between the first angle and the second angle is less thanabout 1 degree.
 34. The drill string of claim 33, wherein the differencebetween the first angle and the second angle is less than about 0.6degrees.
 35. The drill string of claim 2, wherein the difference betweenthe first angle and the second angle is due to gravity-induced sag. 36.The drill string of claim 2, wherein the difference between the firstangle and the second angle is due to physical mounting misalignment ofone or more of the first and second acceleration sensors.
 37. The drillstring of claim 2, wherein the first angle is zero degrees and thesecond angle is a value other than zero degrees.
 38. The drill string ofclaim 2, wherein the first and second acceleration sensors are spacedapart from one another by a distance in a range between about 40 feet toabout 70 feet.
 39. The method of claim 14, further comprising modifyinga direction of drilling of the drill string with respect to the wellborebased on the difference between the first angle and the second angle.